#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>

void fun(int);

int main(int argc,char* argv[])
{
  pid_t pid;
  
  pid = fork();
  if(pid > 0)
  {
    signal(10,fun);
    pause();
    printf("The process is end\n");
    wait(NULL);
  }
  else if(pid == 0)
  {
    sleep(1);
    kill(getppid(),10);
  }

  return 0;
}

void fun(int num)
{
  printf("This is %d signal\n",num);
}
